<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>PACKAGES — <{:C('site_title')}></title>
<meta name="keywords" content="<{:C('site_keyword')}>">
<meta name="description" content="<{:C('site_content')}>">
<include file="Public:cssjs" />
<script type="text/javascript" src="<{:STATICS}>/js/jquery.form.min.js"></script>
<link rel="stylesheet" href="<{:RES}>/css/pay.css">
</head>
<body>
<script>
$(document).ready(function() {
	//ajaxform
	var options = { 
		beforeSubmit:showRequest,//表单验证方式
        success:showResponse  // post-submit callback 
    }; 

    $('#ajaxForm').ajaxForm(options); 

    function showResponse(responseText, statusText)  {
		if (statusText == 'success') {
			var responseText=eval('('+responseText+')');
			if(responseText.state == 'SUCCESS'){
				window.location.href = responseText.url;			
			}else{
				$("#form-btn").removeAttr('disabled');
		 		$("#msg").html('<font style="color:#f00">'+responseText.state+'</font>');	
			}			
		}else{
			$("#form-btn").removeAttr('disabled');
		 	$("#msg").html('Lost Service');			
		}
	} 

	function showRequest(){
		$("#form-btn").attr('disabled','disabled').html('Please wait...');
		$("#msg").html('<img src="/tpl/Home/common/image/loadding.gif">');
	}
});
</script>
<include file="Public:mobilemenu" />

<div id="siteWrapper">
	<div class="blackHeader">
	<include file="Public:menu" />
	</div>
	
	<div class="main">
		<div class="confirm">
			<form id="ajaxForm" action="<{:U('Pay/save')}>" method="post" class="eventForm form-validata">
				<div class="orderDetail">
					<h1>Your Order</h1>
					<li>
						<label>Order Number</label>
						<p><{$parm.order_no}></p>
					</li>

					<li>
						<label>Service</label>
						<volist name="parm.name" id="vo">
						<p><{$vo}><span>$<?php echo $parm['price'][$i-1]?></span></p>
						<input type="hidden" name="pname[]" value="<{$vo}>">
						<input type="hidden" name="price[]" value="<?php echo $parm['price'][$i-1]?>">
						</volist>
					</li>

					<li>
						<label>Name</label>
						<p><{$parm.firstName}><{$parm.lastName}></p>
					</li>

					<li>
						<label>Address</label>
						<p><{$parm.address}></p>
						<p><{$parm.address2}></p>
					</li>

					<li>
						<label>Phone</label>
						<p><{$parm.phone}></p>
					</li>

					<li>
						<label>Email</label>
						<p><{$parm.email}></p>
					</li>

					<li>
						<label>Price</label>
						<p class="price">$<{$total|number_format=###,2}></p>
					</li>
				</div>
				
				<div class="orderBtn">
					<div id="msg"></div>
					<button type="submit" id="form-btn">Confirm and Pay</button>
				</div>
				<input type="hidden" name="firstName" value="<{$parm.firstName}>">
				<input type="hidden" name="lastName" value="<{$parm.lastName}>">
				<input type="hidden" name="address" value="<{$parm.address}>">
				<input type="hidden" name="address2" value="<{$parm.address2}>">
				<input type="hidden" name="city" value="<{$parm.city}>">
				<input type="hidden" name="state" value="<{$parm.state}>">
				<input type="hidden" name="zip" value="<{$parm.zip}>">
				<input type="hidden" name="email" value="<{$parm.email}>">
				<input type="hidden" name="phone" value="<{$parm.phone}>">
				<input type="hidden" name="order_no" value="<{$parm.order_no}>">
				<input type="hidden" name="money" value="<{$total}>">				
				<input type="hidden" name="memberID" value="<{$memberID}>">				
			</form>
		</div>
	</div>

	<include file="Public:footer" />	
</div>

</body>
</html>